<?php

class ZFWork_Form_Decorator_ViewHelper extends Zend_Form_Decorator_ViewHelper {

	public function render($content) {
		$element = $this->getElement();
		if ($element->hasErrors()) {
			if (isset($element->class)) {
				$element->class .= ' error';
			}
			else {
				$element->class = 'error';
			}
		}
		return parent::render($content);
	}

}